﻿
    using Chain.BLL;
    using System;
    using System.Data;
    using System.Text.RegularExpressions;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public partial class historyexpense : Page
    {
        private MicroWebsiteOrderLog MicroWebsiteOrderLogBll = new MicroWebsiteOrderLog();


        protected string GetStatusStr(object objMicroOrderStatus)
        {
            switch (Convert.ToInt32(objMicroOrderStatus))
            {
                case 1:
                    return "订单提交 未支付";

                case 2:
                    return "订单已支付 并通过审核";

                case 3:
                    return "订单提交 但退回";

                case 4:
                    return "订单已支付 审核中...";
            }
            return "未知状态";
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if ((base.Request.Cookies["uid"] != null) && Regex.IsMatch(base.Request.Cookies["uid"].Value, @"^\d+$"))
            {
                int MemID = Convert.ToInt32(base.Request.Cookies["uid"].Value);
                DataTable dt = this.MicroWebsiteOrderLogBll.GetList("MicroOrderMemID=" + MemID + " order by MicroOrderID desc").Tables[0];
                this.rptHistoryExpense.DataSource = dt;
                this.rptHistoryExpense.DataBind();
                if (dt.Rows.Count == 0)
                {
                    this.msg.Style.Add("display", "");
                }
            }
        }
    }


